<template>
	<el-container>
		<el-header class="header-tabs">
			<el-tabs type="card" v-model="groupId" @tab-change="tabChange">
				<el-tab-pane label="我的投票" name="myVote"  tabActiveName="myVote"></el-tab-pane>
				<el-tab-pane label="投票记录" name="oldVote"></el-tab-pane>
			</el-tabs>
		</el-header>
		<component :is="isComponent"/>
	</el-container>
</template>

<script>
import myVote from './myvote'
import oldVote from './oldvote'
export default {
	name: 'My Vote',
	components: {
		myVote,
		oldVote
	},
	data() {
		return {
			groupId:"myVote",
			isComponent:"myVote"
		}
	},
	methods: {
		tabChange(name){
			this.isComponent = name;
		},
	}
}
</script>

<style>
</style>
